#-*-encoding:utf-8-*-

 

#简单的一个连接测试

import pymssql

conn=pymssql.connect(host='127.0.0.1',database='MyDatabase',user='sa',password='sa')

cur=conn.cursor()

cur.execute('USE XCCELERATOR_FAP SELECT TOP 100 * FROM MyTable ')

for r in cur.fetchall():

    #print '\t'.join(r).decode('gb2312').encode('utf-8')
    print r

conn.close()













